//
//  BaseInputViewController.h
//  CarCare
//
//  Created by ileo on 14-8-30.
//  Copyright (c) 2014年 baozun. All rights reserved.
//

#import "BaseTableViewController.h"
#import "NetUser.h"

#define TOP_SIDE 15

#define GAP_HEIGHT  0

typedef NS_ENUM(NSInteger, TYPE_INPUT){
    TYPE_INPUT_SCROLLVIEW,
    TYPE_INPUT_TABLEVIEW
};

@interface BaseInputViewController : BaseTableViewController <UITextFieldDelegate>

-(id)initWithInputType:(TYPE_INPUT)type;

@property (nonatomic , strong) NSMutableArray *textFields;//该页面显示的输入框

-(UITextField *)textFieldWithFrame:(CGRect)frame type:(TEXTFIELD_TYPE)type;
-(void)registerTextField:(UITextField *)textField;

-(BOOL)allTextFieldTextHasNull;

#pragma mark - textFiled 可重写方法 本身不实现
-(void)clickOnKeyBoardDone;
-(void)clickOnBG;

-(void)textFieldWillDidEndEditing:(UITextField *)textField;//
-(void)textFieldTextHasNull:(BOOL)null;//
-(BOOL)textFieldCanAddString:(NSString *)string withTextField:(UITextField *)textField;//
-(void)textFieldTextChanged:(UITextField *)textField;//
-(NSInteger)textFieldMaxNumberWithTextField:(UITextField *)textField;//

-(void)moveViewWhenKeyBoardChangeToHeight:(CGFloat)height WithDuiation:(NSTimeInterval)duration;
-(void)keyBoardWillShow;

#pragma mark - tableview 可重写方法 本身不实现

- (void)tableViewNewCell:(UITableViewCell *)cell textField:(void(^)(NSInteger tagNum))textField Label:(void(^)(NSInteger tagNum))label;
- (void)tableViewGetCell:(UITableViewCell *)cell cellForRowAtIndexPath:(NSIndexPath *)indexPath textField:(UITextField *(^)(NSInteger tagNum))textField Label:(UILabel *(^)(NSInteger tagNum))label;
- (UITextField *)textFieldWithTag:(NSInteger)tagNum withCellIndexPath:(NSIndexPath *)indexPath;
- (UILabel *)labelWithTag:(NSInteger)tagNum withCellIndexPath:(NSIndexPath *)indexPath;


@end
